home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / lib / blt2.4 / bltCanvEps.pro next >
Encoding:
Text File  |  2009-12-04  |  2.2 KB  |  79 lines

  1. %
  2. % PostScript encapulator prolog file of the BLT "eps" canvas item.
  3. %
  4. % Copyright 1991-1997 Bell Labs Innovations for Lucent Technologies.
  5. %
  6. % Permission to use, copy, modify, and distribute this software and its
  7. % documentation for any purpose and without fee is hereby granted, provided
  8. % that the above copyright notice appear in all copies and that both that the
  9. % copyright notice and warranty disclaimer appear in supporting documentation,
  10. % and that the names of Lucent Technologies any of their entities not be used
  11. % in advertising or publicity pertaining to distribution of the software
  12. % without specific, written prior permission.
  13. %
  14. % Lucent Technologies disclaims all warranties with regard to this software,
  15. % including all implied warranties of merchantability and fitness.  In no event
  16. % shall Lucent Technologies be liable for any special, indirect or
  17. % consequential damages or any damages whatsoever resulting from loss of use,
  18. % data or profits, whether in an action of contract, negligence or other
  19. % tortuous action, arising out of or in connection with the use or performance
  20. % of this software.
  21. %
  22.  
  23. %
  24. % The definitions of the next two macros are from Appendix H of 
  25. % Adobe's "PostScript Language Reference Manual" pp. 709-736.
  26.  
  27. % Prepare for EPS file
  28.  
  29. /BeginEPSF {                
  30.   /beforeInclusionState save def
  31.   /dictCount countdictstack def        % Save the # objects in the dictionary
  32.   /opCount count 1 sub def        % Count object on operator stack
  33.   userdict begin            % Make "userdict" the current 
  34.                     % dictionary
  35.     /showpage {} def            % Redefine showpage to be null
  36.     0 setgray 
  37.     0 setlinecap
  38.     1 setlinewidth
  39.     0 setlinejoin
  40.     10 setmiterlimit
  41.     [] 0 setdash
  42.     newpath
  43.     /languagellevel where {
  44.       pop languagelevel 
  45.       1 ne {
  46.     false setstrokeadjust false setoverprint
  47.       } if
  48.     } if
  49.     % note: no "end"
  50. } bind def
  51.  
  52. /EndEPSF { %def
  53.   count opCount sub {
  54.     pop
  55.   } repeat
  56.   countdictstack dictCount sub { 
  57.   end                    % Clean up dictionary stack
  58.   } repeat
  59.   beforeInclusionState restore
  60. } bind def
  61.  
  62.  
  63. %
  64. % Set up a clip region based upon a bounding box (x1, y1, x2, y2).
  65. %
  66. /SetClipRegion {
  67.   % Stack: x1 y1 x2 y2
  68.   newpath
  69.   4 2 roll moveto
  70.   1 index 0 rlineto
  71.   0 exch rlineto
  72.   neg 0 rlineto
  73.   closepath
  74.   clip
  75.   newpath
  76. } def
  77.  
  78.